package com.neusoft.provider.controller;

import com.neusoft.cloud02.domain.Student;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserControler {

    @RequestMapping("/findStudent.do")
    public Student getStudent()
    {
        return new Student(1,"掌声","男","湖北武汉");
    }


    @RequestMapping("/findStubyId/{id}")
    public Student getStudentByID(@PathVariable("id") Integer id)
    {
        if(null!=id)
        return new Student(2,"飞机","男","湖北武汉1111111");
        else return null;
    }

}
